import { MenuSetting } from '../../../types/menu/menuSetting';

import { computed } from 'vue';
import { useAppSettingStore } from '/@/store/modules/appSetting';
const appSettingStore = useAppSettingStore();

export function useMenuSetting() {
  const setMenuSetting = function (menuSetting: MenuSetting) {
    appSettingStore.setMenuSetting(menuSetting);
  };

  const getCollapsed = computed(
    () => appSettingStore.getMenuSetting?.collapsed
  );

  return {
    setMenuSetting,
    getCollapsed,
  };
}
